package com.xxgc.demo.job;
/*
 *
 *   @Author:SJY
 *   @Date: 2023/9/27-09-27-14:23
 *   Job工作对象
 */

import com.xxgc.demo.utils.SpeechSynthesisUtil;
import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

@Slf4j
public class SendEmailToGirlFriendJob implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        //具体执行的代码
        log.info("条件满足我被执行了");
        //获取当前系统时间
        //SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日HH时mm分ss秒");
        //String format = simpleDateFormat.format(new Date());

        SpeechSynthesisUtil synthesisUtil = new SpeechSynthesisUtil();
        //String msg = "从成都开往泸州的长途汽车即将发车了，请乘坐成都开往泸州班次的乘客，携带好行李物品，到3站台检票上车。";
        String msg = "上课了同学们，放下手机，我们现在来把这个封装成工具类。";
        synthesisUtil.speak(msg + "。。。。" + msg);

    }
}
